package com.wtwd.campus.vcom.service.impl;

import com.wtwd.campus.vcom.dao.VcomH5Mapper;
import com.wtwd.campus.vcom.entity.VcomH5Fence;
import com.wtwd.campus.vcom.entity.VcomH5UserDevice;
import com.wtwd.campus.vcom.entity.VcomStudentDevice;
import com.wtwd.campus.vcom.entity.VcomWarningRecord;
import com.wtwd.campus.vcom.entity.vo.VcomH5FenceVO;
import com.wtwd.campus.vcom.service.VcomH5Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class VcomH5ServiceImpl implements VcomH5Service {

    @Autowired
    private VcomH5Mapper vcomH5Mapper;

    @Override
    public VcomH5UserDevice getBindingById(Integer id) {
        return vcomH5Mapper.getBindingById(id);
    }

    @Override
    public int addVcomH5Binding(VcomH5UserDevice data) {
        return vcomH5Mapper.addVcomH5Binding(data);
    }

    @Override
    public int modifyVcomH5Binding(VcomH5UserDevice data) {
        return vcomH5Mapper.modifyVcomH5Binding(data);
    }

    @Override
    public List<VcomH5Fence> getVcomFenceListByDeviceId(Integer deviceId) {
        return vcomH5Mapper.getVcomFenceListByDeviceId(deviceId);
    }

    @Override
    public List<VcomH5Fence> getVcomFenceListByStuId(String stuId) {
        return vcomH5Mapper.getVcomFenceListByStuId(stuId);
    }

    @Override
    public int modifyVcomFenceDeviceId(Integer deviceId, String stuId) {
        return vcomH5Mapper.modifyVcomFenceDeviceId(deviceId, stuId);
    }

    @Override
    public int deleteFenceByIdAndStuId(Integer id, String stuId) {
        return vcomH5Mapper.deleteFenceByIdAndStuId(id, stuId);
    }

    @Override
    public int modifyFenceInfo(VcomH5FenceVO data) {
        return vcomH5Mapper.modifyFenceInfo(data);
    }

    @Override
    public int addFenceInfo(VcomH5FenceVO data) {
        return vcomH5Mapper.addFenceInfo(data);
    }

    @Override
    public VcomH5Fence getFenceInfoById(Integer id) {
        return vcomH5Mapper.getFenceInfoById(id);
    }

    @Override
    public int addVcomWarningRecord(VcomWarningRecord record) {
        return vcomH5Mapper.addVcomWarningRecord(record);
    }

    @Override
    public String getStudentIdByDeviceId(Integer deviceId) {
        return vcomH5Mapper.getStudentIdByDeviceId(deviceId);
    }

    @Override
    public List<String> getStudentIdByImei(String imei) {
        return vcomH5Mapper.getStudentIdByImei(imei);
    }

    @Override
    public List<VcomWarningRecord> getStudentWarningRecords(Integer num,String stuId) {
        Integer start=num*10;
        Integer size=10;
        return vcomH5Mapper.getStudentWarningRecords(stuId,start,size);
    }

    @Override
    public VcomStudentDevice getVcomStudentDeviceByStuId(String stuId) {
        return vcomH5Mapper.getVcomStudentDeviceByStuId(stuId);
    }

    @Override
    public int addStudentDeviceBinding(VcomStudentDevice data) {
        return vcomH5Mapper.addStudentDeviceBinding(data);
    }

    @Override
    public int modifyStudentDeviceBinding(VcomStudentDevice data) {
        return vcomH5Mapper.modifyStudentDeviceBinding(data);
    }

    @Override
    public int modifyWarningRecordStudentIdByImei(String imei, String stuId) {
        return vcomH5Mapper.modifyWarningRecordStudentIdByImei(imei, stuId);
    }


}
